1. Field of the Invention
The invention relates in general to video coding, and in particular, to a motion compensation method and integrated circuit utilizing the same.
2. Description of the Related Art
Block-based video coding standards such as MPEG 1/2/4 and H.26x achieve data compression by reducing temporal redundancies between video frames and spatial redundancies within a video frame. Encoders conforming to the standards produce a bitstream decodable by other standard compliant decoders.
Each video frame comprises an array of pixels. A macroblock (MB) is a group of pixels, typically 16×16 pixels. The 16×16 block can be further partitioned into block sizes of 16×8, 8×16, 8×8, 8×4, 4×8, or 4×4 in some video coding standards. It is common to estimate movement of an image between frames on a macroblock basis, referred to as motion estimation, which typically comprises comparing a macroblock in the current frame to a number of macroblocks from other reference frames for similarity. The spatial displacement between the macroblock in the current video frame and the most similar macroblock in the reference frames is a motion vector (MV). Motion vectors may be estimated to within a fraction of a pixel, by interpolating pixels from the reference frames.
Motion compensation refers to the reverse process of reconstructing a video frame from a reference frame and the motion vector in a video decoder. RV9 RealVideo specification includes an MV clipping scheme for the motion compensation. FIGS. 1a and 1b show exemplary MV clipping schemes in RealVideo specification RV9, depicting the MV of a 4×4 chrominance component in a macroblock being clipped at right and bottom respectively. RV9 specification provides two MV clipping schemes, including an UMV clipping scheme and a (4×4) block MV clipping scheme. The UMV clipping scheme extends the border pixels to four directions limitlessly, while the (4×4) block MV clipping scheme extends limited extended pixels around the frame boundary of a video frame. In the (4×4) block MV clipping scheme, when the sub-block of a chrominance component is at the outside of the frame boundaries, RV9 specification adjusts the MV such that the sub-block is only less than 1 pixel outside of the right (FIG. 1a) and bottom (FIG. 1b) boundaries, resulting inaccurate reconstructed image.
Thus, a need exists for a motion compensation method for a motion decoder to determine an accurate motion vector for motion compensation near a frame boundary in real video applications.